﻿CREATE TABLE spm.SsasDatabase  -- we add SSAS before 'database' because database is a sql server reserved word
(
	/*
	 * Table to support the SSAS Partition Manager.  See https://SsasPartitionManager.codeplex.com/documentation for documentation.
     *
	 * Part of the SSAS Partition Manager sample code which can be downloaded from https://SsasPartitionManager.codeplex.com/
	 * 
	 * Written by Dr. John Tunnicliffe, independent business intelligence consultant
	 * Available for consultancy assignments and speaking engagements
     * 	
	 * eMail: john@decision-analytics.co.uk 
	 * http://www.decision-analytics.co.uk/
	 * http://www.sqlbits.com/Speakers/Dr_John_Tunnicliffe
	 * https://www.linkedin.com/in/drjohntunnicliffe
	 */
	SsasDatabaseKey INT IDENTITY(1,1) NOT NULL PRIMARY KEY,
	SsasDatabaseName nvarchar(100) NOT NULL,  -- the visible name of the OLAP or Tabular database
    SsasModelType nvarchar(16) NOT NULL, 
    CONSTRAINT [CK_SsasDatabase_ModelType] CHECK (SsasModelType in (N'Multidimensional',N'Tabular')),
);
GO

